package br.ufrn.engcomp.exception;

public class BDException extends Exception {
    /**
	 * 
	 */
    private static final long serialVersionUID = 1L;
    private static BDException singleton = null;
    private String mensagens;

    /**
     * Construtor default
     */
    private BDException() {
    }

    /**
     * Construtor
     * 
     * @param message
     */
    public BDException(String message) {
	super(message);
    }

    /**
     * Construtor
     * 
     * @param cause
     */
    public BDException(Throwable cause) {
	super(cause);
    }

    /**
     * Construtor
     * 
     * @param message
     * @param cause
     */
    public BDException(String message, Throwable cause) {
	super(message, cause);
    }

    public static BDException getInstance() {
	if (singleton == null) {
	    singleton = new BDException();
	}
	return singleton;
    }

    public void setMensagens(String mensagens) {
	this.mensagens = mensagens;
    }

    public String getMensagens() {
	return mensagens;
    }
}